Cost: $0-100
About These Ratings
Difficulty: Beginner to intermediate Danger 1: (No Hazards) Utility:

------------------------

Simple Optical Experiments in Which Spatial Filtering Removes the "Noise" From Pictures

---------------------

by Jearl Walker
November, 1982

---------------------

SPATIAL FILTERING IS A TECHNIQUE by which unwanted information in a picture ("noise") can be separated from wanted information. For example, a picture transmitted from a satellite might have features added by the transmission technique. With spatial filtering the noise (the added features) can be removed from the information (the picture) so that the picture is clearer.


Figure 1: Transparencies of the geometric patterns at the left create the diffraction patterns at the right

Spatial filtering is based on the diffraction and interference of light waves. Arthur Eisenkraft, who teaches physics at Briarcliff High School in Briarcliff Manor, N.Y., has designed a series of experiments by which his students can create a system that functions as an optical computer. Information from a photographic transparency is converted into a diffraction pattern and is then retrieved as a real image. Appropriate filtering of the diffraction pattern enables the students to eliminate noise from the final image. They ultimately can sharpen the image in a halftone reproduction clipped out of a newspaper.

The experimental procedure begins with filtering the light from a helium-neon laser. Light can be regarded in two ways: as rays or as waves. In the ray picture a laser beam is regarded as consisting of precisely parallel rays. In the wave picture the beam is regarded as being a succession of plane wave fronts perpendicular to the light's direction of travel. Neither picture is correct. The rays diverge somewhat, and the wave front is slightly curved. The first task in Eisenkraft's experiments is to filter the beam with a lens and a pinhole so that the nonparallel rays in the beam are eliminated. Then when the light illuminates a transparency, it more closely resembles the ideal picture of a plane wave front.

The lens (labeled L1 in the illustration Figure 2) should have a short focal length because it must focus the laser light onto a pinhole positioned close to it. The distance between the lens and the laser is not critical. Once the lens is in the beam the pinhole is brought into the light focused by the lens and is positioned exactly at the lens's focal point, where the beam is sharpest. The parallel rays in the original beam diffract through the pinhole. The nonparallel rays are not properly focused by the lens and do not pass through the pinhole.

The light emerging from the pinhole forms a spherical wave front. In order to restore the plane wave front the light is collected by a second lens, L2. This collimating lens must be positioned carefully at a distance of one focal length from the pinhole. To achieve this positioning a mirror is placed to reflect light from the lens back through the lens and onto the screen with the pinhole in it. The returned light is initially a spot near the pinhole but not exactly at it. By adjusting the distance between the pinhole and the lens the returned light can be brought to a sharp focus on the pinhole screen. By moving the lens across the optical axis (the line running through the laser, the pinhole and the lenses) the spot of light can be positioned directly on the pinhole. The lens is then in its proper position, centered on the optical axis and at a distance of one focal length from the pinhole. The mirror is removed. The light emerging from the lens is nearly a plane wave.


Figure 2: How the light of the laser is collimated into parllel rays

The light illuminates a photographic transparency placed in front of the lens at some convenient distance. On the transparency is some kind of pattern consisting of opaque and transparent areas. These features diffract the light into a pattern in which the pattern of the transparency is coded. To illustrate the procedure the students first employ a transparency (a slide) consisting of a simple pattern of slits. Eisenkraft made several such transparencies by photographing black-and-white patterns. (A11 the patterns, lenses, pinholes and holders used in Eisenkraft's experiments are available individually or as a kit from Metrologic Instruments, Inc., 143 Harding Avenue, Bellmawr, N.J. 08031.) These patterns are parallel lines, concentric circles or other geometric designs. He used Kodak High Contrast Copy Film in order to have miniature versions of the patterns in the form of slides that he could mount in the light from the collimating lens L2.

For the sake of simplicity let us now consider only the transparency consisting of evenly spaced parallel lines. This slide functions as a diffraction grating. Light falling on the dark lines in the slide is blocked. Light falling on the transparent areas between the lines is diffracted. The pattern of the lines on the slide is encoded in the way the light is. diffracted. The rest of the experimental setup is for studying the coded information and retrieving from it the original pattern in the transparency.

The light diffracted by the transparency is redirected by a third lens, L3, whose focal length should be long. The lens is positioned one focal length away from the transparency. A screen or a plate of ground glass is placed on the other side of the lens, also at a distance of one focal length. The lens brings into focus the diffraction pattern created by the transparency. Studies of diffraction are normally divided into two classes: Fresnel diffraction for when the point of observation is near the source of diffraction and Fraunhofer diffraction for when it is distant. Fraunhofer diffraction is considerably easier to understand mathematically. Hence it would be better to make the distant observation, but practical reasons prohibit it.


Figure 3: Sequence of elements needed to view diffraction from the transparencies

One can in effect put the point of observation infinitely far from the source of diffraction by means of a lens such as L3. The lens must be one focal length away from the transparency, however, so that the features in the transparency will be in the lens's focal plane. Then in the focal plane on the other side of the lens the diffraction pattern redirected by the lens is the sharpest. The plane in which the Fraunhofer diffraction pattern is sharpest is sometimes called the transform plane or diffraction plane.

At some points on the screen the rays of light arrive in phase and interfere constructively. Those points are bright. At other points the rays arrive exactly out of phase and interfere destructively. Those points are dark. At points where the rays arrive with some intermediate phase relation the light is dim.

Different kinds of transparencies make different types of diffraction patterns on the screen. A photograph of broad, horizontal, evenly spaced lines yields a pattern of bright dots lying along a vertical. The screen is dark except for these bright dots where the rays of light arrive in phase with one another.

The brightest area in the pattern is at the center. The farther the dots are from the center, the dimmer they are.

A transparency pattern with more closely spaced lines yields a diffraction pattern that is more spread out. Transparency patterns of concentric circles yield diffraction patterns of concentric circles. More closely spaced circles in the transparency yield more widely spaced circles in the diffraction pattern. Grids of lines yield diffraction patterns consisting of bright points in the shape of a cross. The more closely spaced the grid lines, the more widely spaced the points in the cross.

Following Eisenkraft's instructions, his students replace the screen with various types of filters constructed to block selected sections of the diffraction patterns that pass through the diffraction plane. Each filter is an empty cardboard slide holder on which pieces of opaque tape are stuck. The opening left by the tape determines how much of a diffraction pattern passes through the filter. For example, if all but the center of the slide holder is opaque tape, then only a small section of the pattern is passed. If the filter is centered on the optical axis, that section of the pattern would be the center one. With other openings an entire row of bright dots in the pattern can be either passed or eliminated.

To observe the light passed by a filter placed in the diffraction plane an additional lens is required. It must be placed


Figure 4: Sequence of elements needed to view real images from diffraction patterns

accurately one focal length away from the diffraction plane. The alignment calls for the same procedure as the one with the lens L2. A pinhole is mounted in the diffraction plane. Light diffracted through the pinhole illuminates the last lens of the system. A mirror reflects the light transmitted by the lens back through the lens and onto the pinhole. The lens is moved either along the optical axis or perpendicular to it until the returned spot of light falls on the pinhole. Then the pinhole is replaced with a filter. The mirror is replaced with a screen, a plate of ground glass or a camera.

If the light coming through the system is not eliminated at the diffraction plane with an opaque filter, it interferes with itself on the screen to produce a real image of whatever is in the transparency. For example, if the transparency consists of parallel rows of lines, then on the screen parallel rows of lines appear as a real image. The orientation of the final image, however, is inverted from that of the transparency. With a pattern such as parallel lines the inversion is immaterial. With asymmetric patterns, of course, the inversion is quite noticeable.

As the students experiment with various transparencies and filters they get several surprises. A slide of a grid yields a diffraction pattern consisting of bright points in crossed vertical and horizontal rows. Suppose a filter with a narrow slit is mounted in the diffraction plane. By rotating the slit about the optical axis one can choose which sections of the diffraction pattern pass to the screen. Suppose one chooses to pass a vertical section of the diffraction pattern. The surprise is that the final image on the screen consists not of vertical lines but of horizontal ones. The transmitted section of the diffraction pattern is diffracted by the final lens L4 to yield a real image of horizontal lines. The filter in the diffraction plane has eliminated the information about vertical lines in the original grid of the transparency.


Figure 5: The effects of spatial filtering (second, third and fourth from top) on transparencies of three geometric patterns (top)

If the transparency is replaced with one that has concentric circles, the filter with a slit passes only a section of the information about the circles. Suppose the slit is horizontal. Then only the vertical sections of the circles appear in the s final real image on the screen. The horizontal sections of the circles are missing because the parts of the diffraction pattern carrying information about them are blocked by the filter.

Perhaps the most surprising demonstration comes when the transparency is a grid and the slit filter is oriented at 45 degrees from the vertical. The filter then passes information about both the horizontal and the vertical lines of the grid. Not all the information is being passed, however. The result is a set of parallel lines lying at 45 degrees from the vertical (and perpendicular to the slit in the filter). These lines do not exist in the original grid. They nonetheless appear with the filtering of the information carried in the diffraction pattern of the grid.

One of the advantages of spatial filtering is that it can eliminate from a picture undesired features that appear with a certain frequency as one scans across the picture. For example, the picture may have superposed on it a set of regularly spaced parallel lines. The lines ca result from the transmission of the picture through some kind of information system.

In order to demonstrate how his optical equipment can remove such noise from a picture, Eisenkraft first sets up an experiment with some standard black-and-white transparencies of patterns from Metrologic Instruments. The patterns are of four types. One pattern is a set of radial lines. A. second is a set of parallel lines of varying widths and lengths. The third is a set of concentric rings with varying spaces between them. The fourth is a set of nested ovals.

In the diffraction plane and centered on the optical axis Eisenkraft mounts an iris diaphragm with a variable opening. For the transparency he first chooses the pattern of radial lines. The iris diaphragm is set at less than two millimeters. Then only the center of the diffraction pattern is passed on to the screen. The result is an overall illumination of the screen with no hint of the features in the transparency.

When Eisenkraft opens the diaphragm to a diameter of two millimeters, the screen begins to show features. The image is incomplete: the outer areas of the pattern in the transparency are visible but the inner areas are missing. As Eisenkraft opens the diaphragm further more detail appears in the image. Finally with an iris diameter of 15 millimeters the image shows most of the original pattern.


Figure 6: The effects of spatial filtering (middle and right) on a transparency of a halftone picture (left)

The explanation for the change in the detail of the image is subtle. The change has nothing to do with where in the transparency the features lie. Therefore the image is not merely the result of a small opening's exposing only the outer areas of the transparency. Instead the detail of the final image depends on the spacing of features in the transparency. In the outer areas of the transparency's pattern the spatial frequency of the lines is low, that is, the lines are far apart. If you were to scan the transparency in a large circle centered on the pattern the frequency with which you crossed lines would be low. Toward the inner part of the pattern the spatial frequency of the lines is high, that is, the lines are close together. If you were to scan the transparency in a small circle, the frequency with which you crossed lines would be higher.

When the transparency diffracts the light passing through it and when the lens L3 focuses the diffracted light onto the diffraction plane, the diffraction pattern depends on the spatial frequency in the transparency. Features with low spatial frequency pass through the diffraction plane near the optical axis. Features with high spatial frequency pass through the plane with part of their diffraction pattern farther off the optical axis.

When the iris diaphragm is mounted in the diffraction plane, it determines how much of the diffraction pattern passes through to the screen. If the opening in the diaphragm is near the optical axis, it blocks much of the diffraction pattern related to the features with high spatial frequencies. What is primarily passed is the parts of the diffraction pattern from the features with low spatial frequencies. With the radial-line transparency a small iris passes only the outer areas of the pattern. As the iris is opened more of the features of high spatial frequency are transmitted to the screen. When the iris is quite small, not enough of the diffraction pattern is transmitted to the screen for an image of the pattern to be formed.

Eisenkraft next replaces the radial-line transparency with the parallel-line one. The spacing of the lines (and thus the spatial frequency) varies across the width of the transparency. When the iris is small, only part of the pattern is transmitted to the screen. The iris blocks the section of the diffraction pattern generated by the areas of the transparency where the lines are closely spaced (high spatial frequency). The iris passes the section of the diffraction pattern generated by the widely spaced lines (low spatial frequency). As the iris is opened further, more of the features with high spatial frequency are passed. With an iris diameter of 15 millimeters most of the features of the original pattern appear on the screen.

Eisenkraft now inserts the transparency with concentric circles. When the iris is small, only the areas of the original pattern near the center survive to reach the screen. These areas have a low spatial frequency because the spaces between the circles are relatively wide. In the outer areas of the pattern the spaces between the circles are narrower. In order for these areas of the pattern to contribute to the image on the screen the iris must be opened wider.


Figure 7: Spatial filters in second and fourth horizontal rows produced the images above them. Unfiltered picture is at top left

In a halftone photograph the tones (shades) of black are determined by the spatial distribution of tiny dots. Reproductions of photographs in newspapers and magazines are a common example. Eisenkraft made a transparency of a halftone portrait photograph, enlarging the photograph so that the halftone dots would be more apparent. He mounts the transparency in the usual place in his apparatus. To demonstrate spatial filtering to his students he first inserts into the diffraction plane a filter with a slit. When the slit is horizontal, the image on the screen consists of vertical lines. That the image is a portrait of a man is apparent, but so are the vertical lines making up the image. When the slit is vertical, the image consists of horizontal lines. When the slit is at some intermediate angle, the image has lines perpendicular to the orientation of the slit and is therefore also slanted.

The filter with a slit is then replaced with an iris diaphragm. If the iris is considerably smaller than two millimeters, only the center of the diffraction pattern coming from the transparency is transmitted to the screen. The result is a featureless illumination of the screen.

When the iris has a diameter of two r millimeters, most of the features of the photograph appear in the final real image produced by the apparatus. The features are not sharp but are still recognizable. Missing entirely, however, is the pattern of halftone dots that is quite apparent in the original transparency. Those dots have a spatial frequency that is higher than most of the features in the photograph. When the iris is small, they are eliminated by the apparatus.

As the iris is opened, more of the features with high spatial frequencies reach the screen. Eventually the dot array becomes apparent. With the iris set at 12 millimeters the image is essentially that of the original photograph. The image with the best quality might be considered to be an intermediate one. Some of the sharpness of the features in the photograph are lost but so is the disturbing pattern of dots. With spatial filtering Eisenkraft can decrease or eliminate noise (the dot pattern) from the information (the portrait of the man photographed).

With spatial filtering one can store more than one photograph on the same transparency. Eisenkraft recommends the following procedure. Over a continuous-tone photograph (as opposed to one reproduced in halftone dots) place a black-and-white grating of thin parallel lines. Photograph this sandwich of the photograph and the grating. Now replace the photograph being copied with another photograph but rotate the grating 90 degrees. Reexpose the film in the camera.

After the film is processed you have a transparency bearing two photographs. To retrieve either of the photographs place the transparency in the apparatus for spatial filtering. With no filter in the diffraction plane both photographs contribute real images to the screen and the composite double exposure is visible. The diffraction pattern cast by the composite transparency consists of horizontal and vertical dots of light. The vertical dots come from the photograph made when the grating was horizontal the horizontal dots come from the other photograph, which had the grating up and down in the camera's field of view. If the filter mounted in the diffraction plane passes the center dot, both photographs contribute to the real image on the screen. If, however, the filter passes only an off-center vertical dot, then only the photograph responsible for that dot appears on the screen. When more off-center vertical dots are allowed to pass, the image is sharper and brighter. If instead only off-center horizontal dots pass through the filter, then only the other photograph appears on the screen.

The series of photographs in Figure 6 illustrates how one can spatially filter at selected frequency ranges. The first photograph is the transparency that is to be filtered. The rest of the photographs show the results of the filtering.

The second photograph was made through a narrow-band-pass filter, that is, the filter allowed to pass to the screen features with spatial frequencies in a narrow middle range. A drawing of the filter is adjacent to the filtered result. The filter has an opaque dot at its center to block the lower range of spatial frequencies. Transmission of somewhat higher spatial frequencies is allowed by a narrow transparent ring. Still higher frequencies are blocked by the opaque region surrounding the transparent ring.

In the third photograph the filter passed frequencies over a larger range. The transparent ring is larger. The opaque dot at the center still blocks the lower frequencies. The outer opaque region still blocks the higher frequencies. More detail is apparent in the final image falling on the screen because of the broader band of frequencies passed by the filter.

In the fourth photograph only the low frequencies are blocked. Many fine details can be seen in the resulting filtered image. Enough information is available in the high-frequency range for the viewer to see that the original photograph was one of a man with a mustache.

The last three photographs are similar to the preceding three except that the opaque dot at the center of the filter is larger. Therefore the low frequencies contribute less to the final image. Comparisons between the two sets of three photographs are interesting. For example, the loss of information is apparent when one eliminates more of the low frequencies. Some general features of the face disappear. The mustache, however, remains clearly visible, apparently because its image depends primarily on high-frequency information.

The optical system set up by Eisenkraft can be regarded as an optical computer. The diffraction of the light by an object (the transparency) is in a sense computed by the lens L3 so that the diffraction pattern is available in the diffraction plane. Whatever is passed through that plane by a filter is then recomputed by the lens L4 so that a real image is created on the screen.

The production of the diffraction pattern from the features of the original object can be regarded as the mathematical procedure known as a Fourier transform. The diffraction pattern is a representation of the spatial frequencies of the features in the object. If the object has many features that are spaced close to one another, the diffraction pattern will have fairly bright spots well spread around the optical axis. If the object has many features that are spaced farther apart, the pattern will fall closer to the optical axis. The shape of the pattern and its spatial extent with respect to the optical axis encodes the information in the object. To retrieve the information (or part of it) in order to make a real image, another Fourier transform must be done. This transformation is accomplished by the last lens in the system. It receives the light passed through the diffraction plane and creates a real image.

Both the diffraction patterns and the real images resulting from them can be photographed. Mount a 35-millimeter single-lens reflex camera in either the diffraction plane or the image plane. The lens should be removed and the film, not the front of the camera, should be in the plane of interest. Eisenkraft recommends Kodak Panatomic-X film because its fine grain holds the details of the patterns. The camera is triggered with a cable release to minimize jarring. The internal meter indicates the approximate exposure needed, but he takes several photographs at both higher and lower f stops.

Eisenkraft makes the transparencies the same way, except of course with a lens in the camera. Of the several exposures he made of a pattern, he chooses the one with the densest black lines, the most transparent clear regions and the least "bleeding" along the edges of the black lines. For the grid transparencies he double-exposes his film to a pattern of parallel black lines. The first exposure has the lines in one direction. The second exposure has them turned 90 degrees. Transparencies with finer grids are made by moving the camera farther away from the pattern.

With an apparatus similar to Eisenkraft's you can explore many features of spatial filtering. Numerous ideas can be found in Eisenkraft's publications listed in this month's bibliography. In particular you might want to investigate how to store several sets of image information in the same transparency. Some sets might be limited to different ranges of spatial frequencies, so that the images can be retrieved with filters having the appropriate passbands.

Bibliography

TWO-DIMENSIONAL TRANSFORMS. Jurgen R. Meyer-Arendt in Introduction to Classical and Modern Optics. Prentice-Hall, Inc., 1972.

A CLOSER LOOK AT DIFFRACTION: EXPERIMENTS IN SPATIAL PILTERING. Arthur Eisenkraft in The Physics Teacher, Vol. 15, No. 5, pages 199-211 April, 1977.

PHYSICAL OPTICS USING A HELIUM-NEON LASER. Arthur Eisenkraft. Metrologic Instruments, Inc., 1980.

Suppliers and Organizations

The Society for Amateur Scientists (SAS) is a nonprofit research and educational organization dedicated to helping people enrich their lives by following their passion to take part in scientific adventures of all kinds.

The Society for Amateur Scientists
5600 Post Road, #114-341
East Greenwich, RI 02818
Phone: 1-877-527-0382 voice/fax

Internet: http://www.sas.org/



At Surplus Shed, you'll find optical components such as lenses, prisms, mirrors, beamsplitters, achromats, optical flats, lens and mirror blanks, and unique optical pieces. In addition, there are borescopes, boresights, microscopes, telescopes, aerial cameras, filters, electronic test equipment, and other optical and electronic stuff. All available at a fraction of the original cost.

SURPLUS SHED
407 U.S. Route 222
Blandon, PA 19510 USA
Phone/fax : 610-926-9226
Phone/fax toll free: 877-7SURPLUS (877-778-7758)
E-Mail: surplushed@aol.com
Web Site: http://www.SurplusShed.com